package com.db.schedule;
import java.sql.*;
import java.util.*;
import java.io.*;

import org.springframework.orm.ibatis.SqlMapClientTemplate;

import com.db.schedule.*;
import com.ibatis.common.resources.*;	//xml파일 읽기
import com.ibatis.sqlmap.client.*;	//xml을 파서

public class ScheduleDAO {
	private SqlMapClientTemplate template;
	
	
	public void setTemplate(SqlMapClientTemplate template) {
		this.template = template;
	}
	
	public List ScheduleAllData(ScheduleVO vo)throws Exception
	{
		return template.queryForList("ScheduleAllData", vo);
	}
	//insert
	public void ScheduleInsert(ScheduleVO vo)throws Exception
	{
		template.insert("ScheduleInsert", vo);
	}
	//내용보기
	public ScheduleVO SchedulePlan(int sno) throws Exception{
		return (ScheduleVO)template.queryForObject("SchedulePlan",sno); 
	}
	//delete
	public void deletePlan(int sno) throws Exception{
		template.delete("deletePlan",sno);
	}
	
	//update
	public void UpdatePlan(ScheduleVO vo) throws Exception{
		template.update("UpdatePlan",vo);
	}
	

}
